package com.zr.qkchat.data.model;

import java.io.Serializable;
import javax.persistence.*;
import java.sql.Timestamp;


/**
 * The persistent class for the single_msg database table.
 * 
 */
@Entity
@Table(name="single_msg")
@NamedQuery(name="SingleMsg.findAll", query="SELECT s FROM SingleMsg s")
public class SingleMsg implements Serializable {

	private static final long serialVersionUID = 1L;

	@Id
	private String uid;

	@Column(name="create_time")
	private Timestamp createTime;

	@Column(name="data_type")
	private short dataType;

	@Column(name="text_content")
	private String textContent;

	//bi-directional many-to-one association to User
	@ManyToOne
	@JoinColumn(name="from_userid")
	private User fromUser;

	//bi-directional many-to-one association to User
	@ManyToOne
	@JoinColumn(name="to_userid")
	private User toUser;

	public SingleMsg() {
	}

	public String getUid() {
		return this.uid;
	}

	public void setUid(String uid) {
		this.uid = uid;
	}

	public Timestamp getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Timestamp createTime) {
		this.createTime = createTime;
	}

	public short getDataType() {
		return this.dataType;
	}

	public void setDataType(short dataType) {
		this.dataType = dataType;
	}

	public String getTextContent() {
		return this.textContent;
	}

	public void setTextContent(String textContent) {
		this.textContent = textContent;
	}

	public User getFromUser() {
		return this.fromUser;
	}

	public void setFromUser(User fromUser) {
		this.fromUser = fromUser;
	}

	public User getToUser() {
		return this.toUser;
	}

	public void setToUser(User toUser) {
		this.toUser = toUser;
	}

}